package cn.iocoder.yudao.module.promotion.controller.admin.points.pointsproduct;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 积分商品 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class PointsProductBaseVO {

    @Schema(description = "积分活动编号", example = "26119")
    private Long activityId;

    @Schema(description = "商品 SPU 编号", example = "2246")
    private Long spuId;

    @Schema(description = "商品 SKU 编号", example = "13172")
    private Long skuId;

    @Schema(description = "积分商品状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Byte activityStatus;

    @Schema(description = "活动开始时间点", requiredMode = Schema.RequiredMode.REQUIRED)
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime activityStartTime;

    @Schema(description = "活动结束时间点", requiredMode = Schema.RequiredMode.REQUIRED)
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime activityEndTime;

    @Schema(description = "积分价格，单位分", requiredMode = Schema.RequiredMode.REQUIRED, example = "5126")
    @NotNull(message = "积分价格，单位分不能为空")
    private Integer combinationPrice;

    @Schema(description = "积分", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "积分不能为空")
    private Integer points;

}
